import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class CaminhoVlc implements ActionListener {
	public Arquivos arq = new Arquivos();
	public void acheVlc(){
		File caminho = arq.pegarArquivo("Ache o vlc.exe");
    	try {
    		new File("VLC.txt").delete();
			FileWriter writer = new FileWriter("VLC.txt",true);
			writer.write(caminho.getPath());
			writer.close();
			MainPc.vlcpath = caminho.getPath();
			MainPc.vlclabel.setText("O caminho para seu vlc eh: "+MainPc.vlcpath);
		} catch (IOException e1) {
			e1.printStackTrace();
		} 
	}
	public void actionPerformed (ActionEvent e){
		File caminho = arq.pegarArquivo("Ache o vlc.exe");
    	try {
    		new File("VLC.txt").delete();
			FileWriter writer = new FileWriter("VLC.txt",true);
			writer.write(caminho.getPath());
			writer.close();
			MainPc.vlcpath = caminho.getPath();
			MainPc.telnet = new Telnet(MainPc.vlcpath);
			MainPc.vlclabel.setText("O caminho para seu vlc eh: "+MainPc.vlcpath);
		} catch (IOException e1) {
			e1.printStackTrace();
		} 
	}
}
